from LeetCoder import *


class Solution:

    def maximumSumQueries(self, nums1: List[int], nums2: List[int],
                          queries: List[List[int]]) -> List[int]:
        array: list = zip(nums1, nums2)
        array.sort(key=lambda a: a[0])
        n = len(nums1)
        mx = [0] * n
        mx[-1] = array[-1][1]
        for i in range(n - 2,-1,-1):
            mx[i] = max(mx[i+1],array[i][1])

        for x,y in queries:
            id = bisect_left(array,x)
            

s = Solution()
print(s)
